Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] evaluate whether a constant vault share price is an appropriate invariant #13

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

mcclurejt
Copy link
Contributor

closes delvtech/hyperdrive#1195

This PR is the result of investigating whether holding share price constant is appropriate for Everlong. I don't believe it is. Keeping share price constant has the exact same effect as not distributing losses. This results in bad UX + a DOS vector for small position sizes.

In a simple atomic case, vault share price decreases during deposits and remains constant through withdrawals.

I've included a very basic playground for checking vault share price before/after various actions, as well as some cleanup items (comments / outdated tests / contract naming).

@mcclurejt mcclurejt changed the title Evaluate whether a constant vault share price is an appropriate invariant (3/3) evaluate whether a constant vault share price is an appropriate invariant Oct 31, 2024
@mcclurejt mcclurejt force-pushed the mcclurejt/feat/vault-share-price-invariant branch from 4152378 to 1c9a97c Compare October 31, 2024 07:07
@mcclurejt mcclurejt force-pushed the mcclurejt/feat/hyperdrive-error-handling branch 2 times, most recently from 01d9185 to ad4d2d7 Compare October 31, 2024 21:17
Base automatically changed from mcclurejt/feat/hyperdrive-error-handling to main October 31, 2024 21:58
Keepers are expected to use the configuration object to circumvent
hyperdrive errors
…iant

- Removed rebalancing from sandwich tests since the situation is
supposed to be atomic
- Keeping share price constant has the exact same effect as not
distributing losses.
  - This results in bad UX + a DOS vector for small position sizes.
  - In the case of bonds devaluing via huge LP, this loss should affect
others.
- No need to handle the case where a redemption would be zero, with
distributed losses this isn't possible.
- Vault share price decreases on deposit, remains constant on redemption
(for base atomic case).
@mcclurejt mcclurejt force-pushed the mcclurejt/feat/vault-share-price-invariant branch from 1c9a97c to 0bb6b9c Compare November 4, 2024 16:49
@mcclurejt mcclurejt changed the title (3/3) evaluate whether a constant vault share price is an appropriate invariant [WIP] evaluate whether a constant vault share price is an appropriate invariant Nov 4, 2024
@mcclurejt mcclurejt marked this pull request as draft November 4, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Everlong Vault Share Price Invariant
1 participant